package com.sinodata.bsm.center.web.action.appview;

public class ResTypeGroupEnum {
    //基础设备
    private final static long HOST_RES_TYPE = 1101000000000L;
    private final static long DATABASE_RES_TYPE = 1102000000000L;
    private final static long APPMIDDLEWARE_RES_TYPE = 1103000000000L;
    private final static long MSGMIDDLEWARE_RES_TYPE = 1104000000000L;

    //连通性
    private final static long PING_RES_TYPE = 1105030000000L;

    private final static long PROT_RES_TYPE = 1201080000000L;
    private static Long WINPROC = 1205020100000L;

    private static Long UNIXPROC = 1205020200000L;
    //应用文件
    private final static long LOGFILE_RES_TYPE = 1105010000000L;
    //其它应用等
    private final static long OTHER_APP_RES_TYPE = 1105040000000L;

    private static Long FILE_PROC = 1205010100000L;

    private static Long FILE_CONT = 1205010300000L;

    private static Long SQL = 1205040200000L;

    private static Long SHELL = 1205040300000L;

    /**
     * 获取基础监控的资源类别
     * @return
     */
    public static long[] getBaseResType() {
        return new long[] { HOST_RES_TYPE, DATABASE_RES_TYPE, APPMIDDLEWARE_RES_TYPE, MSGMIDDLEWARE_RES_TYPE };
    }

    /**
     * 获取连通性监控的资源类别
     * @return
     */
    public static long[] getPingResType() {
        return new long[] { PING_RES_TYPE };
    }

    /**
     * 获取进程和端口的资源类别
     * @return
     */
    public static long[] getProPortResType() {
        return new long[] { WINPROC, UNIXPROC, PROT_RES_TYPE };
    }

    /**
     * 应用文件资源类别
     * @return
     */
    public static long[] getLogFileResType() {
        return new long[] { FILE_PROC, FILE_CONT };
    }

    /**
     * SQL
     * @return
     */
    public static long[] getSqlResType() {
        return new long[] { SQL };
    }

    /**
     * SQL
     * @return
     */
    public static long[] getShellType() {
        return new long[] { SHELL };
    }
}
